package com.sgb.packers.entity;

import android.text.TextUtils;

import com.chad.library.adapter.base.entity.MultiItemEntity;
import com.swgk.core.base.model.entity.SingleItemConstant;

import java.util.List;

/**
 * @author : younghow
 * @date : 2021/11/30 16:20
 * description:
 */
public class WorkTakeEntity {


    private List<ListDTO> list;
    private String recordDate;

    public List<ListDTO> getList() {
        return list;
    }

    public void setList(List<ListDTO> list) {
        this.list = list;
    }

    public String getRecordDate() {
        return recordDate;
    }

    public void setRecordDate(String recordDate) {
        this.recordDate = recordDate;
    }

    public static class ListDTO  implements MultiItemEntity {
        private String content;
        private String haveWorkOvertime;
        private String operateNum;
        private String picture;
        private String projectName;
        private String projectNo;
        private String rType;
        private String recordDate;
        private String remark;
        private String salary;
        private String settleWorkerNo;
        private String userNo;
        private String workDuration;
        private String workOvertimeDuration;
        private String workRecordNo;
        private String workType;
        private String workTypeName;
        private String workerName;
        String quantitiesUnit;
        String quantities;

        public String getQuantitiesUnit() {
            return quantitiesUnit;
        }

        public void setQuantitiesUnit(String quantitiesUnit) {
            this.quantitiesUnit = quantitiesUnit;
        }

        public String getQuantities() {
            return quantities;
        }

        public void setQuantities(String quantities) {
            this.quantities = quantities;
        }

        public String getContent() {
            return content;
        }

        public void setContent(String content) {
            this.content = content;
        }

        public String getHaveWorkOvertime() {
            return haveWorkOvertime;
        }

        public void setHaveWorkOvertime(String haveWorkOvertime) {
            this.haveWorkOvertime = haveWorkOvertime;
        }

        public String getOperateNum() {
            return operateNum;
        }

        public void setOperateNum(String operateNum) {
            this.operateNum = operateNum;
        }

        public String getPicture() {
            return picture;
        }

        public void setPicture(String picture) {
            this.picture = picture;
        }

        public String getProjectName() {
            return projectName;
        }

        public void setProjectName(String projectName) {
            this.projectName = projectName;
        }

        public String getProjectNo() {
            return projectNo;
        }

        public void setProjectNo(String projectNo) {
            this.projectNo = projectNo;
        }

        public String getrType() {
            return rType;
        }

        public void setrType(String rType) {
            this.rType = rType;
        }

        public String getRecordDate() {
            return recordDate;
        }

        public void setRecordDate(String recordDate) {
            this.recordDate = recordDate;
        }

        public String getRemark() {
            return remark;
        }

        public void setRemark(String remark) {
            this.remark = remark;
        }

        public String getSalary() {
            return (TextUtils.isEmpty(salary) || Double.parseDouble(salary) == 0) ? "" : salary+"元";
        }

        public void setSalary(String salary) {
            this.salary = salary;
        }

        public String getSettleWorkerNo() {
            return settleWorkerNo;
        }

        public void setSettleWorkerNo(String settleWorkerNo) {
            this.settleWorkerNo = settleWorkerNo;
        }

        public String getUserNo() {
            return userNo;
        }

        public void setUserNo(String userNo) {
            this.userNo = userNo;
        }

        public String getWorkDuration() {
            return workDuration;
        }

        public void setWorkDuration(String workDuration) {
            this.workDuration = workDuration;
        }

        public String getWorkOvertimeDuration() {
            return workOvertimeDuration;
        }

        public void setWorkOvertimeDuration(String workOvertimeDuration) {
            this.workOvertimeDuration = workOvertimeDuration;
        }

        public String getWorkRecordNo() {
            return workRecordNo;
        }

        public void setWorkRecordNo(String workRecordNo) {
            this.workRecordNo = workRecordNo;
        }

        public String getWorkType() {
            return workType;
        }

        public void setWorkType(String workType) {
            this.workType = workType;
        }

        public String getWorkTypeName() {
            return workTypeName;
        }

        public void setWorkTypeName(String workTypeName) {
            this.workTypeName = workTypeName;
        }

        public String getWorkerName() {
            return workerName;
        }

        public void setWorkerName(String workerName) {
            this.workerName = workerName;
        }

        @Override
        public int getItemType() {
            int itemType;
            if(rType.equals("1")){//1:点工,2:包工
                itemType = SingleItemConstant.TYPE_ONE;
            }else{
                itemType = SingleItemConstant.TYPE_TWO;
            }
            return itemType;
        }
    }
}
